#include "stdio.h"

int main() {
    int i, count;
    for (i = 1; i <= 100; i++) {
        if (i % 5 != 0 && i % 6 != 0) {
            count++;
            printf("%3d", i);
            if (count == 5) {
                printf("\n");
                count = 0;
            }
        }
    }

    return 0;
}
